package com.easyweb.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.easyweb.dao.BaseDao;
import com.easyweb.dao.GalleryDao;
import com.easyweb.model.Gallery;
@Repository
public class GalleryDaoImpl extends BaseDao implements GalleryDao{

	public int insertGallery(Gallery gallery) {
		return getSqlSession().insert("gallery.insertGallery",gallery);
	}

	public int deleteGalleryById(Map<String, Object> map) {
		return getSqlSession().delete("gallery.deleteGalleryById", map);
	}

	public int updateGallery(Gallery gallery) {
		return getSqlSession().update("gallery.updateGalleryById", gallery);
	}

	public List<Gallery> getGallerys(Map<String, Object> map) {
		return getSqlSession().selectList("gallery.selectGallerys", map);
	}

	public Gallery getGalleryById(Map<String, Object> map) {
		return getSqlSession().selectOne("gallery.selectGallerys", map);
	}

}
